home *** CD-ROM | disk | FTP | other *** search
- /*
- MultiFinder.h -- MultiFinder Interfaces
-
- C Interface to the Macintosh Libraries
- Copyright Apple Computer,Inc. 1987
- All rights reserved.
- */
-
- #ifndef __MULTIFIN__
- #define __MULTIFIN__
- #ifndef __EVENTS__
- #endif
- #ifndef __QUICKDRAW__
- #endif
-
-
- /* MultiFinder dispatch trap */
-
- #define _OSDISPATCH 0xA88F
- #define _WAITNEXTEVENT 0xA860
-
-
-
- /* Routine selector values */
-
- #define mfMaxMemSel 21
- #define mfFreeMemSel 24
- #define mfTempNewHandleSel 29
- #define mfTempHLockSel 30
- #define mfTempHUnLockSel 31
- #define mfTempDisposHandleSel 32
-
-
- #define MFMaxMem(grow) \
- cMFMaxMem(grow,mfMaxMemSel)
-
- #define MFFreeMem() \
- cMFFreeMem(mfFreeMemSel)
-
- #define MFTempNewHandle(logicalSize,resultCode) \
- cMFTempNewHandle(logicalSize,resultCode,mfTempNewHandleSel)
-
- #define MFTempHLock(h,resultCode) \
- cMFTempHLock(h,resultCode,mfTempHLockSel)
-
- #define MFTempHUnLock(h,resultCode) \
- cMFTempHUnLock(h,resultCode,mfTempHUnLockSel)
-
- #define MFTempDisposHandle(h,resultCode) \
- cMFTempDisposHandle(h,resultCode,mfTempDisposHandleSel)
-
-
- /* WaitNextEvent was released in MPW 2.0 interfaces. It is
- commented out below to avoid a duplicate declaration.
- Uncomment only if working with earlier interfaces. */
-
- pascal Boolean WaitNextEvent(mask,event,sleep,mouseRgn)
- unsigned short mask;
- EventRecord *event;
- unsigned long sleep;
- RgnHandle mouseRgn;
- {
- asm {
- SUBQ.L #2, SP
- MOVE.W 20(A6), -(SP) /* short mask */
- MOVE.L 16(A6), -(SP) /* long *event */
- MOVE.L 12(A6), -(SP) /* long sleep */
- MOVE.L 8(A6), -(SP) /* long handle */
- DC.W _WAITNEXTEVENT
- MOVE.W (SP)+, 22(A6) /* return stack pointer to where it started from */
- }
- }
-
- pascal long cMFMaxMem(grow, SW)
- long *grow;
- short SW;
- {
- asm{
- SUBQ.L #4, SP
- MOVE.L 10(A6), -(SP) /* long *grow */
- MOVE.W 8(A6), -(SP) /* short SW */
- DC.W _OSDISPATCH
- MOVE.L (SP)+, 14(A6) /* return stack pointer to where it started from */
- }
- }
-
- pascal Size cMFFreeMem(SW)
- short SW;
- {
- asm{
- DC.W _OSDISPATCH
- }
- }
-
- pascal Handle cMFTempNewHandle(logicalSize, resultCode, SW)
- unsigned long logicalSize;
- short *resultCode;
- short SW;
- {
- asm{
- DC.W _OSDISPATCH
- }
- }
-
- pascal void cMFTempHLock(h, resultCode, SW)
- Handle h;
- short *resultCode;
- short SW;
- {
- asm{
- DC.W _OSDISPATCH
- }
- }
-
- pascal void cMFTempHUnLock(h, resultCode, SW)
- Handle h;
- short *resultCode;
- short SW;
- {
- asm{
- DC.W _OSDISPATCH
- }
- }
-
- pascal void cMFTempDisposHandle(h, resultCode, SW)
- Handle h;
- short *resultCode;
- short SW;
- {
- asm{
- DC.W _OSDISPATCH
- }
- }
-
-
- #endif
-